package com.heima.wemedia.controller.feign;

import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmUser;
import com.heima.wemedia.service.WmUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Luo Zeqi
 * @Date: 2022/11/16/20:02
 */

@RestController
@Slf4j
public class WmFeignController {

    @Autowired
    private WmUserService wmUserService;

    @PostMapping("/wmuser/get")
    public ResponseResult getWmUser(@RequestBody WmUser wmUser){
        return ResponseResult.okResult(wmUserService.getById(wmUser.getId()));
    }

}
